﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.Common.Dtos
{
    /// <summary>
    /// ItemPairDto
    /// </summary>
    public class ItemPairDto : ITreeNode
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 父级
        /// </summary>
        public string ParentCode { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 拓展字段
        /// </summary>
        public string ExtendFiled { get; set; }

        /// <summary>
        /// 拓展字段
        /// </summary>
        public string ExtendFiled1 { get; set; }

        /// <summary>
        /// 拓展字段
        /// </summary>
        public string ExtendFiled2 { get; set; }

        /// <summary>
        /// 拓展字段
        /// </summary>
        public string ExtendFiled3 { get; set; }

        /// <summary>
        /// 子集
        /// </summary>
        public List<ItemPairDto> Options { get; set; }

        public string GetId()
        {
            return Value;
        }

        public string GetPid()
        {
            return ParentCode;
        }

        public void SetChildren(IList children)
        {
            Options = (List<ItemPairDto>)children;
        }
    }
}
